import { Injectable, Pipe, PipeTransform } from '@angular/core';

@Pipe({
    name: 'strReplace'
})
@Injectable()
export class StrReplacePipe implements PipeTransform {
    transform(term: string, search: string, replace: string) {
        return term.replace(new RegExp(search, 'g'), replace);
    }
}
